<%@ page import="javax.servlet.http.HttpSession" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<%@ include file="/includes/head.jsp" %>

<body>

<div id="page">

	<%@ include file="/includes/header.jsp" %>
	
	<div id="menulinks">
		<a href="index.jsp"><span>Home</span></a>	
		<div class="menulines"></div>
		<a href="about.jsp"><span>About</span></a>
		<div class="menulines"></div>
		<a class="active" href="entry.jsp"><span>Entry</span></a>
		<div class="menulines"></div>
		<a href="query.jsp"><span>Query</span></a>
		<div class="menulines"></div>
		<a href="logout.jsp"><span>Logout</span></a>
		<div class="menulines"></div>
		<a href="engineers.jsp"><span>Engineers</span></a>
		<div class="menulines"></div>
	</div>
	
	<div id="mainarea">
		<div id="contentarea">
			<h2><img src="images/add_sm.png" alt="Project Entry" /> &nbsp; Entry</h2>
			<% 
				//continue from previous session
				HttpSession session_login = request.getSession(true);
				String userName = (String) session_login.getAttribute("username");
				if(userName != null){
					out.println("<b>Welcome " + userName + "</b>");
				}else{
					response.sendRedirect("login.jsp");
				}
			 %>
			 <a href="logout.jsp"><font color="blue">Logout</font></a>
			 
			<div class="content">
				<p>Welcome to Data Entry page, you may now upload your project (files) using the form below.  Once successfully uploaded, you will be able to run SPARQL queries against your project as well as others' project files.</p>
				<form onsubmit="return checkFile();" action="uploadFile" method="post" enctype="multipart/form-data">
					<table>
						<tr><td>Project Name</td><td><input type="text" name="projectname" size="35"/></td><tr>
						<tr><td>Java File 1</td><td><input type="file" id="file1" name="file1" size="35"/><br/><div class="error" id="fileError">Not a Java file. Please upload a valid .java file</div></td><tr>
						<tr><td>Java File 2</td><td><input type="file" name="file2" size="35"/></td><tr>
						<tr><td>Java File 3</td><td><input type="file" name="file3" size="35"/></td><tr>
						<tr><td></td><td><input type="submit" name="submit" /></td></tr>
					</table>
				</form>
			</div>
		
		</div>
		
	
		<%@ include file="/includes/sidebar.jsp" %>
		<%@ include file="/includes/footer.jsp" %>
	</div>

</body>

</html>
